package com.isunland.managesystem.entity;

import com.google.gson.annotations.JsonAdapter;
import com.isunland.managesystem.base.BaseModel;
import com.isunland.managesystem.utils.FullDateSeriallizer;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * 对象功能:r_distribution_detail_sub Model对象
 * 开发公司:北京信普达系统工程有限公司
 * 开发人员:lhr
 * 创建时间:2017-07-25 11:12:35
 */
@SuppressWarnings("all") public class RDistributionDetailSub extends BaseModel {
  // 主键
  protected String id;
  // 默认排序字段
  protected Long orderNo;
  // 默认备注字段
  protected String remark;
  // 登记人ID
  protected String regStaffId;
  // 登记人名称
  protected String regStaffName;
  // 登记人时间
  @JsonAdapter(FullDateSeriallizer.class) protected java.util.Date regDate;
  // 会员编码
  protected String memberCode;
  // 会员名称
  protected String memberName;
  // 关联主表ID
  protected String mainId;
  // 物料产品ID
  protected String materialId;
  // 物料名称
  protected String materialName;
  // 规格型号
  protected String mtype;
  // 单位
  protected String munit;
  // 订货数量
  protected Double mnumber;
  // 已办理数量
  protected Double handleMnumber;
  // 已发货数量
  protected Double shippedMnumber;
  // 本次发货数量
  protected Double thisShippedMnumber;
  // 已退货数量
  protected Double returnMnumber;
  // 合同发货清单\订单发货清单ID
  protected String subId;
  // 合同\清单（contract\order）
  protected String subType;

  public void setId(String id) {
    if (id != null) {
      this.id = id.trim();
    } else {
      this.id = id;
    }
  }

  /**
   * 返回 主键
   */
  public String getId() {

    if (this.id != null) {
      return this.id.trim();
    } else {
      return this.id;
    }
  }

  public void setOrderNo(Long orderNo) {
    if (orderNo != null) {
      this.orderNo = orderNo;
    } else {
      this.orderNo = orderNo;
    }
  }

  /**
   * 返回 默认排序字段
   */
  public Long getOrderNo() {

    if (this.orderNo != null) {
      return this.orderNo;
    } else {
      return this.orderNo;
    }
  }

  public void setRemark(String remark) {
    if (remark != null) {
      this.remark = remark.trim();
    } else {
      this.remark = remark;
    }
  }

  /**
   * 返回 默认备注字段
   */
  public String getRemark() {

    if (this.remark != null) {
      return this.remark.trim();
    } else {
      return this.remark;
    }
  }

  public void setRegStaffId(String regStaffId) {
    if (regStaffId != null) {
      this.regStaffId = regStaffId.trim();
    } else {
      this.regStaffId = regStaffId;
    }
  }

  /**
   * 返回 登记人ID
   */
  public String getRegStaffId() {

    if (this.regStaffId != null) {
      return this.regStaffId.trim();
    } else {
      return this.regStaffId;
    }
  }

  public void setRegStaffName(String regStaffName) {
    if (regStaffName != null) {
      this.regStaffName = regStaffName.trim();
    } else {
      this.regStaffName = regStaffName;
    }
  }

  /**
   * 返回 登记人名称
   */
  public String getRegStaffName() {

    if (this.regStaffName != null) {
      return this.regStaffName.trim();
    } else {
      return this.regStaffName;
    }
  }

  public void setRegDate(java.util.Date regDate) {
    if (regDate != null) {
      this.regDate = regDate;
    } else {
      this.regDate = regDate;
    }
  }

  /**
   * 返回 登记人时间
   */
  public java.util.Date getRegDate() {

    if (this.regDate != null) {
      return this.regDate;
    } else {
      return this.regDate;
    }
  }

  public void setMemberCode(String memberCode) {
    if (memberCode != null) {
      this.memberCode = memberCode.trim();
    } else {
      this.memberCode = memberCode;
    }
  }

  /**
   * 返回 会员编码
   */
  public String getMemberCode() {

    if (this.memberCode != null) {
      return this.memberCode.trim();
    } else {
      return this.memberCode;
    }
  }

  public void setMemberName(String memberName) {
    if (memberName != null) {
      this.memberName = memberName.trim();
    } else {
      this.memberName = memberName;
    }
  }

  /**
   * 返回 会员名称
   */
  public String getMemberName() {

    if (this.memberName != null) {
      return this.memberName.trim();
    } else {
      return this.memberName;
    }
  }

  public void setMainId(String mainId) {
    if (mainId != null) {
      this.mainId = mainId.trim();
    } else {
      this.mainId = mainId;
    }
  }

  /**
   * 返回 关联主表ID
   */
  public String getMainId() {

    if (this.mainId != null) {
      return this.mainId.trim();
    } else {
      return this.mainId;
    }
  }

  public void setMaterialId(String materialId) {
    if (materialId != null) {
      this.materialId = materialId.trim();
    } else {
      this.materialId = materialId;
    }
  }

  /**
   * 返回 物料产品ID
   */
  public String getMaterialId() {

    if (this.materialId != null) {
      return this.materialId.trim();
    } else {
      return this.materialId;
    }
  }

  public void setMaterialName(String materialName) {
    if (materialName != null) {
      this.materialName = materialName.trim();
    } else {
      this.materialName = materialName;
    }
  }

  /**
   * 返回 物料名称
   */
  public String getMaterialName() {

    if (this.materialName != null) {
      return this.materialName.trim();
    } else {
      return this.materialName;
    }
  }

  public void setMtype(String mtype) {
    if (mtype != null) {
      this.mtype = mtype.trim();
    } else {
      this.mtype = mtype;
    }
  }

  /**
   * 返回 规格型号
   */
  public String getMtype() {

    if (this.mtype != null) {
      return this.mtype.trim();
    } else {
      return this.mtype;
    }
  }

  public void setMunit(String munit) {
    if (munit != null) {
      this.munit = munit.trim();
    } else {
      this.munit = munit;
    }
  }

  /**
   * 返回 单位
   */
  public String getMunit() {

    if (this.munit != null) {
      return this.munit.trim();
    } else {
      return this.munit;
    }
  }

  public void setMnumber(Double mnumber) {
    if (mnumber != null) {
      this.mnumber = mnumber;
    } else {
      this.mnumber = mnumber;
    }
  }

  /**
   * 返回 订货数量
   */
  public Double getMnumber() {

    if (this.mnumber != null) {
      return this.mnumber;
    } else {
      return this.mnumber;
    }
  }

  public void setHandleMnumber(Double handleMnumber) {
    if (handleMnumber != null) {
      this.handleMnumber = handleMnumber;
    } else {
      this.handleMnumber = handleMnumber;
    }
  }

  /**
   * 返回 已办理数量
   */
  public Double getHandleMnumber() {

    if (this.handleMnumber != null) {
      return this.handleMnumber;
    } else {
      return this.handleMnumber;
    }
  }

  public void setShippedMnumber(Double shippedMnumber) {
    if (shippedMnumber != null) {
      this.shippedMnumber = shippedMnumber;
    } else {
      this.shippedMnumber = shippedMnumber;
    }
  }

  /**
   * 返回 已发货数量
   */
  public Double getShippedMnumber() {

    if (this.shippedMnumber != null) {
      return this.shippedMnumber;
    } else {
      return this.shippedMnumber;
    }
  }

  public void setThisShippedMnumber(Double thisShippedMnumber) {
    if (thisShippedMnumber != null) {
      this.thisShippedMnumber = thisShippedMnumber;
    } else {
      this.thisShippedMnumber = thisShippedMnumber;
    }
  }

  /**
   * 返回 本次发货数量
   */
  public Double getThisShippedMnumber() {

    if (this.thisShippedMnumber != null) {
      return this.thisShippedMnumber;
    } else {
      return this.thisShippedMnumber;
    }
  }

  public void setReturnMnumber(Double returnMnumber) {
    if (returnMnumber != null) {
      this.returnMnumber = returnMnumber;
    } else {
      this.returnMnumber = returnMnumber;
    }
  }

  /**
   * 返回 已退货数量
   */
  public Double getReturnMnumber() {

    if (this.returnMnumber != null) {
      return this.returnMnumber;
    } else {
      return this.returnMnumber;
    }
  }

  public void setSubId(String subId) {
    if (subId != null) {
      this.subId = subId.trim();
    } else {
      this.subId = subId;
    }
  }

  /**
   * 返回 合同发货清单\订单发货清单ID
   */
  public String getSubId() {

    if (this.subId != null) {
      return this.subId.trim();
    } else {
      return this.subId;
    }
  }

  public void setSubType(String subType) {
    if (subType != null) {
      this.subType = subType.trim();
    } else {
      this.subType = subType;
    }
  }

  /**
   * 返回 合同\清单（contract\order）
   */
  public String getSubType() {

    if (this.subType != null) {
      return this.subType.trim();
    } else {
      return this.subType;
    }
  }

  /**
   * @see Object#equals(Object)
   */
  public boolean equals(Object object) {
    if (!(object instanceof RDistributionDetailSub)) {
      return false;
    }
    RDistributionDetailSub rhs = (RDistributionDetailSub) object;
    return new EqualsBuilder().append(this.id, rhs.id)
        .append(this.orderNo, rhs.orderNo)
        .append(this.remark, rhs.remark)
        .append(this.regStaffId, rhs.regStaffId)
        .append(this.regStaffName, rhs.regStaffName)
        .append(this.regDate, rhs.regDate)
        .append(this.memberCode, rhs.memberCode)
        .append(this.memberName, rhs.memberName)
        .append(this.mainId, rhs.mainId)
        .append(this.materialId, rhs.materialId)
        .append(this.materialName, rhs.materialName)
        .append(this.mtype, rhs.mtype)
        .append(this.munit, rhs.munit)
        .append(this.mnumber, rhs.mnumber)
        .append(this.handleMnumber, rhs.handleMnumber)
        .append(this.shippedMnumber, rhs.shippedMnumber)
        .append(this.thisShippedMnumber, rhs.thisShippedMnumber)
        .append(this.returnMnumber, rhs.returnMnumber)
        .append(this.subId, rhs.subId)
        .append(this.subType, rhs.subType)
        .isEquals();
  }

  /**
   * @see Object#hashCode()
   */
  public int hashCode() {
    return new HashCodeBuilder(-82280557, -700257973).append(this.id)
        .append(this.orderNo)
        .append(this.remark)
        .append(this.regStaffId)
        .append(this.regStaffName)
        .append(this.regDate)
        .append(this.memberCode)
        .append(this.memberName)
        .append(this.mainId)
        .append(this.materialId)
        .append(this.materialName)
        .append(this.mtype)
        .append(this.munit)
        .append(this.mnumber)
        .append(this.handleMnumber)
        .append(this.shippedMnumber)
        .append(this.thisShippedMnumber)
        .append(this.returnMnumber)
        .append(this.subId)
        .append(this.subType)
        .toHashCode();
  }

  /**
   * @see Object#toString()
   */
  public String toString() {
    return new ToStringBuilder(this).append("id", this.id)
        .append("orderNo", this.orderNo)
        .append("remark", this.remark)
        .append("regStaffId", this.regStaffId)
        .append("regStaffName", this.regStaffName)
        .append("regDate", this.regDate)
        .append("memberCode", this.memberCode)
        .append("memberName", this.memberName)
        .append("mainId", this.mainId)
        .append("materialId", this.materialId)
        .append("materialName", this.materialName)
        .append("mtype", this.mtype)
        .append("munit", this.munit)
        .append("mnumber", this.mnumber)
        .append("handleMnumber", this.handleMnumber)
        .append("shippedMnumber", this.shippedMnumber)
        .append("thisShippedMnumber", this.thisShippedMnumber)
        .append("returnMnumber", this.returnMnumber)
        .append("subId", this.subId)
        .append("subType", this.subType)
        .toString();
  }
}